Skip to content

Feat/efficientad light - #170

Merged
DeepKnowledge1 merged 24 commits into
mainfrom
feat/efficientad-light
Aug 30, 2026
Merged

Feat/efficientad light#170
DeepKnowledge1 merged 24 commits into
mainfrom
feat/efficientad-light

Conversation

@DeepKnowledge1

Copy link
Copy Markdown
Owner

🔗 Related Issue

Fixes #

📝 Description

This PR adds EfficientAD support to AnomaVision Production Autopilot and extends the performance regression tests to cover all supported anomaly detection algorithms.

Main changes

  • Added EfficientAD as an Autopilot candidate alongside PaDiM and PatchCore.

  • Added --efficientad_model to the Autopilot CLI.

  • Updated Autopilot model selection to compare PaDiM, PatchCore, and EfficientAD using the same validation data.

  • Added EfficientAD latency and accuracy metrics to the Autopilot report.

  • Preserved the existing fancy HTML production report and extended it to include EfficientAD.

  • Added configuration-driven inference performance tests for all three algorithms.

  • Updated the README with EfficientAD and Autopilot documentation.

Example:

anomavision autopilot \
  --config config.yml \
  --padim_model ./distributions/padim/bottle/anomav_exp/model.pt \
  --patchcore_model ./distributions/patchcore/bottle/anomav_exp/model.pt \
  --efficientad_model ./distributions/efficientad/bottle/anomav_exp/model.pt \
  --device cpu \
  --validation_split 1.0 \
  --target_latency_ms 50 \
  --output_dir ./production_package

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)

  • 🚀 New feature (non-breaking change which adds functionality)

  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

  • 📖 Documentation update

  • 🏗️ Infrastructure / CI/CD update

🧪 Hardware & Matrix Testing

I have successfully built and tested this code using uv on:

  • anomavision[cpu] (Standard/Edge)

  • anomavision[cu121] (CUDA 12.1)

  • anomavision[cu124] (CUDA 12.4)

  • anomavision[cu118] (CUDA 11.8)

Host OS used for testing:

  • Linux / Ubuntu

  • Windows (Native or WSL2)

  • macOS

Performance benchmark

The inference performance tests were executed for:

  • PaDiM

  • PatchCore

  • EfficientAD

Example measured results on CPU:

Algorithm | Inference | FPS | Status -- | -- | -- | -- PaDiM | 65.23 ms/batch | 30.66 | ✅ PatchCore | 52.95 ms/batch | 37.77 | ✅ EfficientAD | 72.88 ms/batch | 27.44 | ⚠️ Performance regression detected

The EfficientAD regression test correctly fails when the configured latency threshold is exceeded.

✅ Developer Checklist

  • My code follows the core style guidelines of this project (Ruff/Black formatting).

  • I have run the relevant pytest tests locally.

  • Lockfile Guard: If I added or modified a dependency in pyproject.toml, I have run uv lock --python 3.10 and committed the updated uv.lock file.

  • I have added tests that prove my fix is effective or that my feature works.

  • I have updated the documentation accordingly.

📸 Screenshots / Visual Proof

The Autopilot HTML report includes:

  • Model comparison cards

  • Selected production model

  • Image AUROC

  • Pixel AUROC

  • Median and P95 latency

  • Anomaly coverage

  • False-positive rate

  • Calibrated threshold

  • Localization health

  • Deployment recommendation

The report is generated as:

production_package/production_autopilot_report.html

@DeepKnowledge1
DeepKnowledge1 merged commit be41fea into main Aug 30, 2026
5 checks passed
@DeepKnowledge1
DeepKnowledge1 deleted the feat/efficientad-light branch August 30, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant